﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="DocumentDetailsView.ascx.cs" Inherits="Operations_Views_DocumentDetailsView" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxControlToolkit" %>
<%@ Register Assembly="Janus.Web.GridEX.v3" Namespace="Janus.Web.GridEX" TagPrefix="jwg" %>
<%@ Register TagPrefix="spring" Namespace="Spring.Web.UI.Controls" Assembly="Spring.Web" %>


<spring:DataBindingPanel ID="dataBindingPanel" runat="server">
    <table>
        <tr>
            <td class="detailsFormHeader">
                Details
            </td>
        </tr>
        <tr>
            <td>
                <table>
                    <tr>
                        <td class="detailsFormLabel">
                            <asp:Label ID="Label1" Text="Title:" runat="server" />
                        </td>
                        <td>
                            <asp:TextBox ID="titleTextBox" BindingTarget="Document.Title" CssClass="detailsFormTextBox" ReadOnly="true" runat="server" />                  
                        </td>                                                   
                    </tr>
                    <tr>
                        <td class="detailsFormLabel">
                            <asp:Label ID="Label2" Text="Description:" runat="server" />
                        </td>                        
                        <td class="detailsFormValue">
                            <asp:TextBox ID="descriptionTextBox" BindingTarget="Document.Description" CssClass="detailsFormTextBox" Rows="5" 
                                                                 TextMode="MultiLine" ReadOnly="true" runat="server" />                                                    
                        </td>                                                                     
                    </tr>                                                                    
                </table>
                <br />
                <br />                                                             
            </td>
        </tr>                                                                                      
        <tr>
            <td class="detailsFormHeader">
                Annotations
            </td>
        </tr>
            <td>
                <jwg:GridEX ID="annotationsGridEX" AllowPaging="Automatic" ColumnAutoResize="False" Width="100%"
                            VisualStyle="Custom" runat="server">        
                                 
                    <RootTable TotalRow="False">
                        <Columns>
                            <jwg:GridEXColumn Caption="Id" DataMember="Id" DataTypeCode="Int32" Width="50px" AllowSize="false" 
                                DefaultGroupPrefix="Id:" FilterRowComparison="Equal"  
                                InvalidValueAction="DiscardChanges" Key="Id">
                            </jwg:GridEXColumn>
                            <jwg:GridEXColumn Caption="Descriptor" DataMember="Descriptor"  Width="410px" AllowSize="false"
                                DefaultGroupPrefix="Descriptor:" FilterRowComparison="BeginsWith" 
                                InvalidValueAction="DiscardChanges" Key="Descriptor">
                            </jwg:GridEXColumn>
                            <jwg:GridEXColumn Caption="Type" DataMember="TypeCode"  Width="50px" AllowSize="false"
                                DefaultGroupPrefix="Type:" FilterRowComparison="BeginsWith" 
                                InvalidValueAction="DiscardChanges" Key="Login">
                            </jwg:GridEXColumn>
                            <jwg:GridEXColumn Caption="Language" DataMember="LanguageCode"  Width="80px" AllowSize="false"
                                DefaultGroupPrefix="Language:" FilterRowComparison="BeginsWith" 
                                InvalidValueAction="DiscardChanges" Key="Language">
                            </jwg:GridEXColumn>
                            <jwg:GridEXColumn Caption="Status" DataMember="StatusCode"  Width="80px" AllowSize="false"
                                DefaultGroupPrefix="StatusCode:" FilterRowComparison="BeginsWith" 
                                InvalidValueAction="DiscardChanges" Key="StatusCode">
                            </jwg:GridEXColumn>
                            <jwg:GridEXColumn Caption="Status Date" DataMember="StatusDate"  Width="120px" AllowSize="false"
                                DataTypeCode="DateTime" DefaultGroupPrefix="StatusDate:" 
                                FilterRowComparison="Equal" InvalidValueAction="DiscardChanges" 
                                Key="StatusDate">
                            </jwg:GridEXColumn>
                        </Columns>
                    </RootTable>   
                </jwg:GridEX>
            </td>
        <tr>
                               
        </tr>                        
    </table>  
    <asp:Panel ID="Panel1" CssClass="detailsFormCommandPanel" runat="server">
        <asp:LinkButton ID="returnLinkButton" Text="Return" OnClick="ReturnLinkButton_Click"
                        BindingTarget="ReturnViewName != null" BindingSource="Visible" BindingDirection="TargetToSource" runat="server" /> 
        <asp:LinkButton ID="downloadLinkButton" Text="Download" OnClick="DownloadButton_Click" runat="server" />                                                       
        <asp:LinkButton ID="uploadAnnotationLinkButton" Text="Upload annotation" OnClick="UploadAnnotationLinkButton_Click" runat="server" />
    </asp:Panel>                    
    <br />                    
</spring:DataBindingPanel>